﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;

namespace Utilities
{
    public class Logger
    {
        public static void Write(string errorMessage)
        {
            string path = ConfigurationManager.AppSettings["logPath"];
            FileHelper helper = new FileHelper(path);
            helper.AppendLine(DateTime.Now.ToString() + "\r\nMessange: " + errorMessage);
        }

        public static void Write(Exception ex)
        {
            Write(ex.Message + "\r\nStackTrace:\r\n" + ex.StackTrace + "\r\n\r\n");
        }
    }
}
